package com.chag.app.biz.dao.gen;

import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface AppointMapper {
    int countByExample(AppointCriteria example);

    int deleteByExample(AppointCriteria example);

    @Delete({
        "delete from APPOINT",
        "where APPOINT_ID = #{appointId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer appointId);

    @Insert({
        "insert into APPOINT (APPOINT_ID, BIZ_ID, ",
        "APPOINT_CAT_ID, NAME, ",
        "»î¶¯Ê±¼ä, DETAIL)",
        "values (#{appointId,jdbcType=INTEGER}, #{bizId,jdbcType=INTEGER}, ",
        "#{appointCatId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, ",
        "#{»î¶¯ê±¼ä,jdbcType=VARCHAR}, #{detail,jdbcType=VARCHAR})"
    })
    int insert(Appoint record);

    int insertSelective(Appoint record);

    List<Appoint> selectByExample(AppointCriteria example);

    @Select({
        "select",
        "APPOINT_ID, BIZ_ID, APPOINT_CAT_ID, NAME, »î¶¯Ê±¼ä, DETAIL",
        "from APPOINT",
        "where APPOINT_ID = #{appointId,jdbcType=INTEGER}"
    })
    @ResultMap("BaseResultMap")
    Appoint selectByPrimaryKey(Integer appointId);

    int updateByExampleSelective(@Param("record") Appoint record, @Param("example") AppointCriteria example);

    int updateByExample(@Param("record") Appoint record, @Param("example") AppointCriteria example);

    int updateByPrimaryKeySelective(Appoint record);

    @Update({
        "update APPOINT",
        "set BIZ_ID = #{bizId,jdbcType=INTEGER},",
          "APPOINT_CAT_ID = #{appointCatId,jdbcType=INTEGER},",
          "NAME = #{name,jdbcType=VARCHAR},",
          "»î¶¯Ê±¼ä = #{»î¶¯ê±¼ä,jdbcType=VARCHAR},",
          "DETAIL = #{detail,jdbcType=VARCHAR}",
        "where APPOINT_ID = #{appointId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Appoint record);
}